//=====================================================================
//    COPYRIGHT(C) Innobeam
//    ALL RIGHTS RESERVED
//=====================================================================
//Filename    : FormatDisplayR90.v
//Created On  : 2018-12-29
//Author      : Chao
//Description : Generate formatted display content for portrail display
//					Rotated 90 degree
//Include     : 
//Modification: 
//=====================================================================
`timescale	1ns/100ps
`include	"../rtl/def_command.v"

module FormatDisplayR90(
	iClk,
	iRst_n,
	
	iFKPStatus,
	
	ivRow,
	ivColumn,	
	
	ivDisplay_state	,
	ivGantry		,	
	ivCollimator	,	
	ivSwing			,
	ivMLCX			,	
	ivMLCX1			,	
	ivMLCX2			,	
	ivJAWY			,	
	ivJAWY1			,	
	ivJAWY2			,		
	ivCouch_VRT		,	
	ivCouch_LAT		,	
	ivCouch_LNG		,	
	ivCouch_LNG_PLAN,
	
	ovFontcolor,
	ovBGcolor,
	ovAscii
	);
//========================================================================
//    parameter
//========================================================================
	//states define for Display
	parameter     	Emergency_Display	= 5'b00001;
	parameter     	LATBrake_Display 	= 5'b00010;
	parameter     	LNGBrake_Display 	= 5'b00011;
	parameter     	Touchguard_Display	= 5'b00100;
	parameter     	LATandLNGBrake_Display	= 5'b00101;
//	parameter     	ToCenterOut_Display	= 5'b00110;
	parameter     	GammaGantry_Display	= 5'b00111;
	parameter     	GammaCouch_Display	= 5'b01000;
	parameter     	MLCinitializing_Disply	= 5'b01001;
	parameter     	MLCInitCompleted_Disply	= 5'b01010;
	parameter     	MLCX1Field_Disply = 5'b01011;
	parameter     	MLCY1Field_Disply = 5'b01100;
	parameter		Dark_Display = 5'b01101;
	parameter		ACTUAL_WAITING_CENTER_Display = 5'b10011;
	parameter		ACTUAL_INTO_ERROR_RANGE_Display = 5'b10100;
	parameter		ACTUAL_REACH_CENTER_Display = 5'b10101;
	parameter		MLC_ERROR_Display = 5'b10110;
	parameter		MLC_BOOT_Display = 5'b10111;
	
	parameter		BGcolor = `BGcolor;
	parameter		Fontcolor = `Fontcolor;
	parameter		FillBGcolor = `FillBGcolor;
	parameter		FillFontcolor = `FillFontcolor;
	parameter		Fontcolor_WAITING_CENTER = `Fontcolor_WAITING_CENTER;
	parameter		Fontcolor_INTO_ERROR_RANGE = `Fontcolor_INTO_ERROR_RANGE;
	parameter		Fontcolor_REACH_CENTER = `Fontcolor_REACH_CENTER;
//=======================================================================
//    port
//========================================================================	
	input 				iClk;
	input 				iRst_n;
	
	input				iFKPStatus;	
	
	input		[3:0]	ivRow;			//15~0
	input		[5:0]	ivColumn;		//32~0
	
	input		[4:0]	ivDisplay_state;	
	input		[15:0]	ivGantry;			
	input		[15:0]	ivCollimator;		
	input		[15:0]	ivSwing;
	input		[15:0]	ivMLCX;	
	input		[15:0]	ivMLCX1;				
	input		[15:0]	ivMLCX2;
	input		[15:0]	ivJAWY;	
	input		[15:0]	ivJAWY1;				
	input		[15:0]	ivJAWY2;					
	input		[15:0]	ivCouch_VRT;			
	input		[15:0]	ivCouch_LAT;			
	input		[15:0]	ivCouch_LNG;
	input		[15:0]	ivCouch_LNG_PLAN;
	output		[7:0]	ovAscii;
	output		[15:0]	ovFontcolor;
	output		[15:0]	ovBGcolor;
//========================================================================
//    signal
//========================================================================	
	reg			[7:0]	ovAscii;
	reg			[15:0]	ovFontcolor;
	reg			[15:0]	ovBGcolor;
	reg			[15:0]	DoseData;
	wire		[19:0]	DoseBCD;
	
//========================================================================	
Bin2BCD16 Bin2BCD16_inst(
	.A			(DoseData), 
	.B			(DoseBCD)
	);
	
//========================================================================
//	always @(ivRow or ivColumn or ivDisplay_state or iFKPStatus) begin
	always @(*) begin
//	always@(posedge iClk or negedge iRst_n)begin
		// if(!iRst_n)begin
			// ovAscii	<= 8'h0;
			// DoseData	<= 16'h0;
			// end
		// else begin		
		case(ivDisplay_state)
			Emergency_Display:begin	
				case(ivRow)
				4'd3: begin
					DoseData <= 16'h0;
						case(ivColumn)
							6'd0: begin		
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= "M";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd2: begin
								ovAscii <= "O";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd3: begin
								ovAscii <= "T";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd4: begin
								ovAscii <= "I";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd5: begin
								ovAscii <= "O";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd6: begin
								ovAscii <= "N";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd7: begin	
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd8: begin
								ovAscii <= "S";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd9: begin
								ovAscii <= "T";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd10: begin
								ovAscii <= "O";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd11: begin	
								ovAscii <= "P";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd7: begin
					DoseData <= 16'h0;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:	begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd11:	begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: begin
								ovAscii <= 8'hcf;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd11:	begin
								ovAscii <= 8'hd0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
					end						
				default : begin
						DoseData <= 16'h0;
						ovAscii <= " ";
						ovFontcolor <= Fontcolor;
						ovBGcolor <= BGcolor;
						end
				endcase
			end
		
		LATBrake_Display:begin
			case(ivRow)
				4'd2: begin
					DoseData <= 16'h0;
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= "L";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd2: begin
								ovAscii <= "A";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd3: begin
								ovAscii <= "T";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd4: begin
								ovAscii <= "E";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						    6'd5: begin
								ovAscii <= "R";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						    6'd6: begin
								ovAscii <= "A";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						    6'd7: begin
								ovAscii <= "L";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= "R";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd2: begin
								ovAscii <= "E";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd3: begin	
								ovAscii <= "L";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd4: begin
								ovAscii <= "E";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd5: begin 
								ovAscii <= "A";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd6: begin	
								ovAscii <= "S";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd7: begin
								ovAscii <= "E";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd8: begin	
								ovAscii <= "D";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end	
				4'd7: begin
					DoseData <= 16'h0;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:	begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd11:	begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: begin
								ovAscii <= 8'hcf;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd11:	begin
								ovAscii <= 8'hd0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
					end												
				default : begin
						DoseData <= 16'h0;
						ovAscii <= " ";
						ovFontcolor <= Fontcolor;
						ovBGcolor <= BGcolor;
						end
				endcase
			end
	
		LNGBrake_Display:begin
			case(ivRow)
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "O";
							6'd3:			ovAscii <= "N";
							6'd4:			ovAscii <= "G";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "T";
							6'd7:			ovAscii <= "U";
							6'd8:			ovAscii <= "D";
							6'd9:			ovAscii <= "I";
							6'd10:			ovAscii <= "N";
							6'd11:			ovAscii <= "A";
							6'd12:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "R";
							6'd2:			ovAscii <= "E";
							6'd3:			ovAscii <= "L";
							6'd4:			ovAscii <= "E";
							6'd5:			ovAscii <= "A";
							6'd6:			ovAscii <= "S";
							6'd7:			ovAscii <= "E";
							6'd8:			ovAscii <= "D";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end			
				default : begin
						DoseData <= 16'h0;
						ovFontcolor <= Fontcolor;
						ovBGcolor <= BGcolor;
						ovAscii <= 8'h0;
						end
				endcase
			end	
			
		Touchguard_Display:begin
			case(ivRow)
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= " ";
							6'd2:			ovAscii <= "W";
							6'd3:			ovAscii <= "A";
							6'd4:			ovAscii <= "R";
							6'd5:			ovAscii <= "N";
							6'd6:			ovAscii <= "I";
							6'd7:			ovAscii <= "N";
							6'd8:			ovAscii <= "G";
							6'd9:			ovAscii <= "!";
							6'd10:			ovAscii <= " ";
							6'd11:			ovAscii <= " ";
							6'd12:			ovAscii <= " ";
							default:		ovAscii <= 8'h0;
						endcase
						end			
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	

		LATandLNGBrake_Display:begin
			case(ivRow)
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "A";
							6'd3:			ovAscii <= "T";
							6'd4:			ovAscii <= "E";
							6'd5:			ovAscii <= "R";
							6'd6:			ovAscii <= "A";
							6'd7:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "R";
							6'd2:			ovAscii <= "E";
							6'd3:			ovAscii <= "L";
							6'd4:			ovAscii <= "E";
							6'd5:			ovAscii <= "A";
							6'd6:			ovAscii <= "S";
							6'd7:			ovAscii <= "E";
							6'd8:			ovAscii <= "D";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "O";
							6'd3:			ovAscii <= "N";
							6'd4:			ovAscii <= "G";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "T";
							6'd7:			ovAscii <= "U";
							6'd8:			ovAscii <= "D";
							6'd9:			ovAscii <= "I";
							6'd10:			ovAscii <= "N";
							6'd11:			ovAscii <= "A";
							6'd12:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd6: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "R";
							6'd2:			ovAscii <= "E";
							6'd3:			ovAscii <= "L";
							6'd4:			ovAscii <= "E";
							6'd5:			ovAscii <= "A";
							6'd6:			ovAscii <= "S";
							6'd7:			ovAscii <= "E";
							6'd8:			ovAscii <= "D";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end			
				default : begin
						DoseData <= 16'h0;
						ovFontcolor <= Fontcolor;
						ovBGcolor <= BGcolor;
						ovAscii <= 8'h0;
						end
				endcase
			end	
			
		GammaGantry_Display:begin
			case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0: 			ovAscii <= " ";
							6'd1: 			ovAscii <= "G";
							6'd2: 			ovAscii <= "A";
							6'd3:			ovAscii <= "N";
							6'd4: 			ovAscii <= "T";
							6'd5: 			ovAscii <= "R";
							6'd6: 			ovAscii <= "Y";
							6'd7: 			ovAscii <= " ";				
							default: 		ovAscii <= 8'h0;
						endcase
						end
				4'd2: begin
					DoseData <= ivGantry;
						case(ivColumn)  
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd3: begin
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin
								ovAscii <= 8'h7F;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "C";
							6'd2:			ovAscii <= "O";
							6'd3:			ovAscii <= "L";
							6'd4:			ovAscii <= "L";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "M";
							6'd7:			ovAscii <= "A";
							6'd8:			ovAscii <= "T";
							6'd9:			ovAscii <= "O";
							6'd10:			ovAscii <= "R";
							6'd11:			ovAscii <= " ";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd4: begin
					DoseData <=	ivCollimator;
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd3: begin
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin
								ovAscii <= 8'h7F;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "G";
							6'd2:			ovAscii <= "A";
							6'd3:			ovAscii <= "M";
							6'd4:			ovAscii <= "M";
							6'd5:			ovAscii <= "A";
							6'd6:			ovAscii <= " ";
							6'd7:			ovAscii <= "S";
							6'd8:			ovAscii <= "W";
							6'd9:			ovAscii <= "I";
							6'd10:			ovAscii <= "N";
							6'd11:			ovAscii <= "G";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd6: begin
					DoseData <= {1'b0,ivSwing[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								if(ivSwing[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivSwing[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd2: begin
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd3: begin
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin	
								ovAscii <= 8'h7F;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end	
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end							
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	
			
		GammaCouch_Display:begin
			case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "A";
							6'd3:			ovAscii <= "T";
							6'd4:			ovAscii <= "E";
							6'd5:			ovAscii <= "R";
							6'd6:			ovAscii <= "A";
							6'd7:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd2: begin
					DoseData <= {1'b0,ivCouch_LAT[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LAT[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LAT[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin	
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin	
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin	
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin	
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin	
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "O";
							6'd3:			ovAscii <= "N";
							6'd4:			ovAscii <= "G";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "T";
							6'd7:			ovAscii <= "U";
							6'd8:			ovAscii <= "D";
							6'd9:			ovAscii <= "I";
							6'd10:			ovAscii <= "N";
							6'd11:			ovAscii <= "A";
							6'd12:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd4: begin
					DoseData <= {1'b0,ivCouch_LNG[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LNG[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LNG[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "V";
							6'd2:			ovAscii <= "E";
							6'd3:			ovAscii <= "R";
							6'd4:			ovAscii <= "T";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "C";
							6'd7:			ovAscii <= "A";
							6'd8:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd6: begin
					DoseData <= {1'b0,ivCouch_VRT[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_VRT[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_VRT[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd4: begin		
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd5: begin		
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd6: begin	
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd7: begin	
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd9: begin	
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd10: begin
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd12: begin	
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end	
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end	
						endcase
						end
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end	
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	
			
		MLCinitializing_Disply:begin
			case(ivRow)
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "M";
							6'd2:			ovAscii <= "L";
							6'd3:			ovAscii <= "C";
							default:		ovAscii <= " ";
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "I";
							6'd2:			ovAscii <= "N";
							6'd3:			ovAscii <= "I";
							6'd4:			ovAscii <= "T";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "A";
							6'd7:			ovAscii <= "L";
							6'd8:			ovAscii <= "I";
							6'd9:			ovAscii <= "Z";
							6'd10:			ovAscii <= "I";
							6'd11:			ovAscii <= "N";
							6'd12:			ovAscii <= "G";
							default:		ovAscii <= 8'h0;
						endcase
						end			
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end	
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end

		MLCInitCompleted_Disply:begin
			case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "M";
							6'd2:			ovAscii <= "L";
							6'd3:			ovAscii <= "C";
							6'd4:			ovAscii <= " ";
							6'd5:			ovAscii <= "R";
							6'd6:			ovAscii <= "E";
							6'd7:			ovAscii <= "A";
							6'd8:			ovAscii <= "D";
							6'd9:			ovAscii <= "Y";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "X";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= {1'b0,ivMLCX[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivMLCX[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivMLCX[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin		
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end								
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd4: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "Y";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd5: begin
					DoseData <= {1'b0,ivJAWY[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivJAWY[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivJAWY[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin		
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end								
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end		
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end
			
		MLCX1Field_Disply:begin
			case(ivRow)
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "X";
							6'd2:			ovAscii <= "1";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= {1'b0,ivMLCX1[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivMLCX1[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivMLCX1[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";			
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd3: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin		
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end								
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd4: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "X";
							6'd2:			ovAscii <= "2";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd5: begin
					DoseData <= {1'b0,ivMLCX2[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivMLCX2[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivMLCX2[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";			
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd3: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin		
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end								
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
						
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end
					
		MLCY1Field_Disply:begin
			case(ivRow)
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "Y";
							6'd2:			ovAscii <= "1";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= {1'b0,ivJAWY1[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivJAWY1[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivJAWY1[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";			
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd3: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin		
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end								
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
				4'd4: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "Y";
							6'd2:			ovAscii <= "2";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd5: begin
					DoseData <= {1'b0,ivJAWY2[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivJAWY2[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivJAWY2[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";			
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd3: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin		
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end								
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
						
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end
		
		Dark_Display:begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end

		
		ACTUAL_WAITING_CENTER_Display:begin
			case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "O";
							6'd3:			ovAscii <= "N";
							6'd4:			ovAscii <= "G";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "T";
							6'd7:			ovAscii <= "U";
							6'd8:			ovAscii <= "D";
							6'd9:			ovAscii <= "I";
							6'd10:			ovAscii <= "N";
							6'd11:			ovAscii <= "A";
							6'd12:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "P";
							6'd2:			ovAscii <= "L";
							6'd3:			ovAscii <= "A";
							6'd4:			ovAscii <= "N";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd4: begin
					if(ivCouch_LNG_PLAN != 16'hFFFF)begin
						DoseData <= {1'b0,ivCouch_LNG_PLAN[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LNG_PLAN[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LNG_PLAN[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end
					else begin
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								ovAscii <= "N";	
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= "O";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= "N";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= "E";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end	
					end																	
				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "A";
							6'd2:			ovAscii <= "C";
							6'd3:			ovAscii <= "T";
							6'd4:			ovAscii <= "U";
							6'd5:			ovAscii <= "A";
							6'd6:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd6: begin
					DoseData <= {1'b0,ivCouch_LNG[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LNG[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LNG[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= ".";
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin		
								ovAscii <= "C";
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor_WAITING_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end	
						
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	

		ACTUAL_INTO_ERROR_RANGE_Display:begin
			case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "O";
							6'd3:			ovAscii <= "N";
							6'd4:			ovAscii <= "G";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "T";
							6'd7:			ovAscii <= "U";
							6'd8:			ovAscii <= "D";
							6'd9:			ovAscii <= "I";
							6'd10:			ovAscii <= "N";
							6'd11:			ovAscii <= "A";
							6'd12:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "P";
							6'd2:			ovAscii <= "L";
							6'd3:			ovAscii <= "A";
							6'd4:			ovAscii <= "N";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd4: begin
					DoseData <= {1'b0,ivCouch_LNG_PLAN[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LNG_PLAN[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LNG_PLAN[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end		
				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "A";
							6'd2:			ovAscii <= "C";
							6'd3:			ovAscii <= "T";
							6'd4:			ovAscii <= "U";
							6'd5:			ovAscii <= "A";
							6'd6:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd6: begin
					DoseData <= {1'b0,ivCouch_LNG[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LNG[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LNG[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= ".";
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin		
								ovAscii <= "C";
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor_INTO_ERROR_RANGE;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end	
						
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	

		ACTUAL_REACH_CENTER_Display:begin
			case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "L";
							6'd2:			ovAscii <= "O";
							6'd3:			ovAscii <= "N";
							6'd4:			ovAscii <= "G";
							6'd5:			ovAscii <= "I";
							6'd6:			ovAscii <= "T";
							6'd7:			ovAscii <= "U";
							6'd8:			ovAscii <= "D";
							6'd9:			ovAscii <= "I";
							6'd10:			ovAscii <= "N";
							6'd11:			ovAscii <= "A";
							6'd12:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "P";
							6'd2:			ovAscii <= "L";
							6'd3:			ovAscii <= "A";
							6'd4:			ovAscii <= "N";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd4: begin
					DoseData <= {1'b0,ivCouch_LNG_PLAN[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LNG_PLAN[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LNG_PLAN[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= ".";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin		
								ovAscii <= "C";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= FillFontcolor;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end		
				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= "A";
							6'd2:			ovAscii <= "C";
							6'd3:			ovAscii <= "T";
							6'd4:			ovAscii <= "U";
							6'd5:			ovAscii <= "A";
							6'd6:			ovAscii <= "L";
							default:		ovAscii <= 8'h0;
						endcase
						end
				4'd6: begin
					DoseData <= {1'b0,ivCouch_LNG[14:0]};
						case(ivColumn)
							6'd0: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							6'd1: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd2: begin
								if(ivCouch_LNG[14:0] == 15'd0)
									ovAscii <= " ";
								else if(ivCouch_LNG[15])
									ovAscii <= "-";
								else
									ovAscii <= "+";
									
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end	
							6'd3: begin		
								ovAscii <= DoseBCD[19:16] +8'h30;
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd4: begin	
								ovAscii <= DoseBCD[15:12] +8'h30;
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd5: begin	
								ovAscii <= DoseBCD[11:8] +8'h30;
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd6: begin		
								ovAscii <= ".";
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd7: begin		
								ovAscii <= DoseBCD[7:4] +8'h30;
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd8: begin	
								ovAscii <= DoseBCD[3:0] +8'h30;
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd9: begin		
								ovAscii <= "C";
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd10: begin	
								ovAscii <= "M";
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd11: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor_REACH_CENTER;
								ovBGcolor <= FillBGcolor;
								end
							6'd12: begin
								ovAscii <= " ";
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
							default: begin
								ovAscii <= 8'h0;
								ovFontcolor <= Fontcolor;
								ovBGcolor <= BGcolor;
								end
						endcase
						end	
						
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	
			
		MLC_ERROR_Display:begin	
				case(ivRow)
				4'd3: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd0:			ovAscii <= " ";
							6'd1:			ovAscii <= " ";
							6'd2:			ovAscii <= "M";
							6'd3:			ovAscii <= "L";
							6'd4:			ovAscii <= "C";
							6'd5:			ovAscii <= " ";
							6'd6:			ovAscii <= "E";
							6'd7:			ovAscii <= "R";
							6'd8:			ovAscii <= "R";
							6'd9:			ovAscii <= "O";
							6'd10:			ovAscii <= "R";
							default:		ovAscii <= 8'h0;
						endcase
					end
						
				4'd7: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					if (iFKPStatus) begin
						case(ivColumn)
							6'd10:			ovAscii <= 8'h0;
							6'd11:			ovAscii <= 8'h0;
							default:		ovAscii <= 8'h0;
						endcase
						end
					else begin
						case(ivColumn)
							6'd10: 			ovAscii <= 8'hcf;
							6'd11:			ovAscii <= 8'hd0;
							default: 		ovAscii <= 8'h0;
						endcase
						end
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	
		MLC_BOOT_Display:begin	
				case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd8:			ovAscii <= 8'hB9;
							6'd9:			ovAscii <= 8'hBA;
							6'd10:			ovAscii <= 8'hBB;
							6'd11:			ovAscii <= 8'hBC;
							6'd12:			ovAscii <= 8'hBD;
							default:		ovAscii <= 8'h0;
						endcase
					end
						
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd8:			ovAscii <= 8'hBE;
							6'd9:			ovAscii <= 8'hBF;
							6'd10:			ovAscii <= 8'hC0;
							6'd11:			ovAscii <= 8'hC1;
							6'd12:			ovAscii <= 8'hC2;
							default:		ovAscii <= 8'h0;
						endcase
					end
					
				4'd4: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd1:			ovAscii <= 8'hCC;
							6'd2:			ovAscii <= 8'hCD;
							6'd3:			ovAscii <= 8'hCE;
							default:		ovAscii <= 8'h0;
						endcase
					end	

				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd1:			ovAscii <= 8'hCD;
							6'd2:			ovAscii <= 8'hC3;
							6'd3:			ovAscii <= 8'hC4;
							6'd4:			ovAscii <= 8'hC5;
							6'd5:			ovAscii <= 8'hC6;
							default:		ovAscii <= 8'h0;
						endcase
					end	
	
				4'd6: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd1:			ovAscii <= 8'hC7;
							6'd2:			ovAscii <= 8'hCC;
							6'd3:			ovAscii <= 8'hCE;
							6'd4:			ovAscii <= 8'hC8;
							6'd5:			ovAscii <= 8'hCC;
							6'd6:			ovAscii <= 8'hCE;
							6'd7:			ovAscii <= 8'hC9;
							6'd8:			ovAscii <= 8'hCA;
							6'd9:			ovAscii <= 8'hCC;
							6'd10:			ovAscii <= 8'hCB;
							default:		ovAscii <= 8'h0;
						endcase
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end	
			
		default : begin
				case(ivRow)
				4'd1: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd8:			ovAscii <= 8'hB9;
							6'd9:			ovAscii <= 8'hBA;
							6'd10:			ovAscii <= 8'hBB;
							6'd11:			ovAscii <= 8'hBC;
							6'd12:			ovAscii <= 8'hBD;
							default:		ovAscii <= 8'h0;
						endcase
					end
						
				4'd2: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd8:			ovAscii <= 8'hBE;
							6'd9:			ovAscii <= 8'hBF;
							6'd10:			ovAscii <= 8'hC0;
							6'd11:			ovAscii <= 8'hC1;
							6'd12:			ovAscii <= 8'hC2;
							default:		ovAscii <= 8'h0;
						endcase
					end
					
				4'd4: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd1:			ovAscii <= 8'hCC;
							6'd2:			ovAscii <= 8'hCD;
							6'd3:			ovAscii <= 8'hCE;
							default:		ovAscii <= 8'h0;
						endcase
					end	

				4'd5: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd1:			ovAscii <= 8'hCD;
							6'd2:			ovAscii <= 8'hC3;
							6'd3:			ovAscii <= 8'hC4;
							6'd4:			ovAscii <= 8'hC5;
							6'd5:			ovAscii <= 8'hC6;
							default:		ovAscii <= 8'h0;
						endcase
					end	
	
				4'd6: begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
						case(ivColumn)
							6'd1:			ovAscii <= 8'hC7;
							6'd2:			ovAscii <= 8'hCC;
							6'd3:			ovAscii <= 8'hCE;
							6'd4:			ovAscii <= 8'hC8;
							6'd5:			ovAscii <= 8'hCC;
							6'd6:			ovAscii <= 8'hCE;
							6'd7:			ovAscii <= 8'hC9;
							6'd8:			ovAscii <= 8'hCA;
							6'd9:			ovAscii <= 8'hCC;
							6'd10:			ovAscii <= 8'hCB;
							default:		ovAscii <= 8'h0;
						endcase
					end		
				default : begin
					DoseData <= 16'h0;
					ovFontcolor <= Fontcolor;
					ovBGcolor <= BGcolor;
					ovAscii <= 8'h0;
					end
				endcase
			end
		endcase
		end
	
endmodule
